﻿using System;
using System.Windows;
using Kiva7.ViewModels;

namespace Kiva7.Pages
{
    public partial class LoansPage
    {
        public readonly static Uri PageUrl = new Uri("/Pages/LoansPage.xaml", UriKind.RelativeOrAbsolute);

        public LoansPage()
        {
            InitializeComponent();
            CreateStandardControls();
        }

        private void Page_Loaded(object sender, RoutedEventArgs e)
        {
            ctlInRepayment.SetBindingList(DataController.ViewModel.Loans.InRepayment);
            ctlDefaulted.SetBindingList(DataController.ViewModel.Loans.Defaulted);
            ctlFunded.SetBindingList(DataController.ViewModel.Loans.Funded);
            ctlFundraising.SetBindingList(DataController.ViewModel.Loans.Fundraising);
            ctlPaid.SetBindingList(DataController.ViewModel.Loans.Paid);
            ctlRefunded.SetBindingList(DataController.ViewModel.Loans.Refunded);
            ctlExpired.SetBindingList(DataController.ViewModel.Loans.Expired);
        }

    }
}